<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../引入vue2.js"></script>
</head>

<body>
    <div id="app">
        <div v-if="flag">剑圣</div>
        <div v-else>兽王</div>

        <!-- vm.flag = false -->
        <h1>订单列表</h1>
        <ul>
            <li v-for="item in list" key="item.id">
                {{item.title}}---
                <p v-if="item.status===0">未付款</p>
                <p v-else-if="item.status===1">已付款</p>
                <p v-else-if="item.status===0">已发货</p>
                <p v-else>已签收</p>
                <!-- <span v-else>已完成</span> -->
            </li>
        </ul>
    </div>
</body>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            flag: false,
            list: [{
                    id: 1,
                    title: 'a',
                    status: 0
                },
                {
                    id: 2,
                    title: 'b',
                    status: 1
                },
                {
                    id: 3,
                    title: 'c',
                    status: 2
                },
                {
                    id: 4,
                    title: 'd',
                    status: 3
                },
            ]
        },
    })
</script>

</html>